<?php

namespace App\Admin\Actions\Post;

use Encore\Admin\Actions\Action;
use Illuminate\Database\Eloquent\Collection;

class OpenAllPost extends Action
{
    public function handle(Collection $collection, Request $request)
    {
        foreach ($collection as $model) {
            // 
        }

        return $this->response()->success('举报已提交！')->refresh();
    }
    
    public function html()
    {
        return <<<HTML
        <a class="openall-posts btn btn-sm btn-success"><i class="fa fa-chain"></i>&nbsp;&nbsp;全部开启</a>
HTML;
    }
}